package factory.abs.extend;

import factory.abs.FactoryBuilder;
import factory.color.Color;
import factory.color.impl.Blue;
import factory.color.impl.Green;
import factory.color.impl.Red;
import factory.shape.Shape;

public class ColorFactory extends FactoryBuilder{

    @Override
    public Color getColor(String color) {
        if(color == null) {
            return null;
        }
        if(color.equalsIgnoreCase("red")) {
            return new Red();
        }else if(color.equalsIgnoreCase("blue")) {
            return new Blue();
        }else if(color.equalsIgnoreCase("green")) {
            return new Green();
        }
        return null;
    }

    @Override
    public Shape getShape(String shape) {
        // TODO Auto-generated method stub
        return null;
    }

}
